package com.ruoyi.member.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * 会员等级对象 member_level
 * 
 * @author ruoyi
 */
public class MemberLevel extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 等级ID */
    private Integer levelId;

    /** 等级名称 */
    @NotBlank(message = "等级名称不能为空")
    @Size(min = 0, max = 50, message = "等级名称长度不能超过50个字符")
    @Excel(name = "等级名称")
    private String levelName;

    /** 等级值 */
    @NotNull(message = "等级值不能为空")
    @Excel(name = "等级值")
    private Integer levelValue;

    /** 等级最小积分 */
    @NotNull(message = "最小积分不能为空")
    @Excel(name = "最小积分")
    private Integer pointsMin;

    /** 等级最大积分 */
    @NotNull(message = "最大积分不能为空")
    @Excel(name = "最大积分")
    private Integer pointsMax;

    /** 折扣率 */
    @Excel(name = "折扣率")
    private BigDecimal discount;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    public Integer getLevelId() {
        return levelId;
    }

    public void setLevelId(Integer levelId) {
        this.levelId = levelId;
    }

    public String getLevelName() {
        return levelName;
    }

    public void setLevelName(String levelName) {
        this.levelName = levelName;
    }

    public Integer getLevelValue() {
        return levelValue;
    }

    public void setLevelValue(Integer levelValue) {
        this.levelValue = levelValue;
    }

    public Integer getPointsMin() {
        return pointsMin;
    }

    public void setPointsMin(Integer pointsMin) {
        this.pointsMin = pointsMin;
    }

    public Integer getPointsMax() {
        return pointsMax;
    }

    public void setPointsMax(Integer pointsMax) {
        this.pointsMax = pointsMax;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("levelId", getLevelId())
            .append("levelName", getLevelName())
            .append("levelValue", getLevelValue())
            .append("pointsMin", getPointsMin())
            .append("pointsMax", getPointsMax())
            .append("discount", getDiscount())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
} 